<ui:composition template="/template.xhtml"
				xmlns="http://www.w3.org/1999/xhtml"
				xmlns:h="http://java.sun.com/jsf/html"
				xmlns:f="http://java.sun.com/jsf/core"
				xmlns:ui="http://java.sun.com/jsf/facelets"
				xmlns:rich="http://richfaces.org/rich"
				xmlns:a4j="http://richfaces.org/a4j"
				xmlns:b="http://richfaces.org/sandbox/bootstrap">

<ui:define name="content">
	<h:form id="add_form" styleClass="form-horizontal">
		<h1 class="hOne"><a4j:outputPanel id="siteName"><h:outputText id="sitename_text" styleClass="gray" value="#{rdrs.siteName}" rendered="#{not empty rdrs.siteName}" /></a4j:outputPanel> <span class="gray">#{msg['redirect.admin.site']}</span> #{msg['redirect.admin.impexp']}</h1>
		<div id="main-alert" class="alert" style="opacity: 0;">
			<!-- <button data-dismiss="alert" class="modal-close">Close</button> -->
			<strong id="main-alert-title"></strong> <span id="main-alert-message"></span>
		</div><!-- End .alert -->

		<a4j:commandLink action="#{rdrEdit.addRedirect(rdrs.siteName)}" styleClass="btn btn-small pull-right add-redirect" render=":edit_form" rendered="#{not empty rdrs.siteName}" oncomplete="configureRedirect();">#{msg['redirect.admin.site.redirect.add']}</a4j:commandLink>
	</h:form>
		<h:form id="sum_form" styleClass="form-horizontal">
			<!-- No site selected -->
			<h:panelGroup rendered="#{empty rdrs.siteName}">
				<h2 class="initial">#{msg['redirect.admin.site.select']}</h2>
				<p class="initial">
					#{msg['redirect.admin.site.select.msg']}<br />
					<small style="opacity: 0.5;">#{msg['redirect.admin.site.select.na']}</small>
				</p>
				<h:graphicImage class="initial" library="img" name="site-redirects.png" alt="Illustration: Arrow pointing from a laptop to a tablet and a smartphone" />
				<p class="initial"> </p>
				<h2 class="initial">#{msg['redirect.admin.site.select.export']}</h2>
				<p class="initial">#{msg['redirect.admin.site.select.export.msg']}</p>
			</h:panelGroup>

			<span id="redirectSummaryWrapper">
				<!-- Site selected, with no redirects -->
				<h:panelGroup rendered="#{not empty rdrs.siteName and rdrs.redirects.size() eq 0}">
					<h2 class="initial">#{msg['redirect.admin.site.redirect.noset']}</h2>
					<p class="initial">#{msg['redirect.admin.site.redirect.noset.msg']}</p>
					<h:graphicImage class="initial" library="img" name="site-redirects.png" alt="Illustration: Arrow pointing from a laptop to a tablet and a smartphone" />
				</h:panelGroup>

				<h:panelGroup id="pgRedirectSummary" rendered="#{rdrs.redirects.size() > 0}">
					<table id="redirect-table" class="table table-striped">
						<thead id="redirect-summary-header" class="redirect-summary" summary="Redirect configuration">
							<tr>
								<th scope="col">#{msg['redirect.admin.site.redirect.sum.status']}</th>
								<th scope="col">#{msg['redirect.admin.site.redirect.sum.name']}</th>
								<th scope="col">#{msg['redirect.admin.site.redirect.sum.config']}</th>
								<th scope="col" class="actions hidden-element">Actions</th>
							</tr>
						</thead>
						<tbody class="sortable sortable-rdr">
						<ui:repeat value="#{rdrs.redirects}" var="r" varStatus="status">
							<ui:param name="redirectSiteExists" value="#{rdrEdit.checkSiteExists(r.redirectSite)}" />
							<!-- Redirect Summary Row -->
							<tr id="rdr_sum_#{status.index}" class="redirect-summary">
								<td>
									<div class="onoffswitch" tabindex="0">
										<h:selectBooleanCheckbox id="rdr_toggle" styleClass="onoffswitch-checkbox" value="#{r.enabled}" />
										<h:outputLabel for="rdr_toggle" styleClass="onoffswitch-label">
											<f:ajax event="click" render="@this" listener="#{rdrEdit.toggleEnabled(rdrs.siteName, r.name)}" />
											<span class="onoffswitch-inner">
												<span class="onoffswitch-active">#{msg['redirect.admin.site.redirect.on']}</span>
												<span class="onoffswitch-inactive">#{msg['redirect.admin.site.redirect.off']}</span>
											</span>
											<span class="onoffswitch-switch"></span>
										</h:outputLabel>
									</div>
								</td>
								<td>#{r.name}</td>
								<td><span style="#{redirectSiteExists ? '' : 'color: #AA0000;'}"><i class="#{redirectSiteExists ? 'hidden-element' : 'icon-warning-sign tooltipTrigger'}" title="#{msg['redirect.admin.site.redirect.sum.td.redirectto.notavailable']}"></i> #{msg['redirect.admin.site.redirect.sum.td.redirectto']} #{r.redirectSite}</span><span class="second-info">#{r.conditions.size()} #{msg['redirect.admin.site.redirect.sum.td.conditions']} #{r.mappings.mappings.size()} #{msg['redirect.admin.site.redirect.sum.td.mappings']}</span></td>
								<td class="actions" style="text-align: center;">
									<a4j:commandLink styleClass="configure-redirect redirect-summary" action="#{rdrEdit.load(rdrs.siteName, r.name)}" render=":edit_form" oncomplete="configureRedirect();" title="Configure"><i class="icon-wrench tooltipTrigger" data-original-title="#{msg['redirect.admin.site.redirect.sum.but.config']}">#{msg['redirect.admin.site.redirect.sum.but.config']}</i></a4j:commandLink>
									<h:commandLink styleClass="delete-redirect redirect-summary" title="Delete">
										<f:ajax event="action" listener="#{rdrEdit.setDeleteRedirect(rdrs.siteName, r.name)}" onevent="deleteRedirect('#{rdrs.siteName}','#{r.name}')" />
										<i class="icon-trash tooltipTrigger" data-original-title="#{msg['redirect.admin.site.redirect.sum.but.delete']}">#{msg['redirect.admin.site.redirect.sum.but.delete']}</i>
									</h:commandLink>
								</td>
							</tr>
						</ui:repeat>
						</tbody>
					</table>
					<h:outputScript>sortable();</h:outputScript>
				</h:panelGroup>
			</span>
		</h:form>

		<!-- Edit Redirect Table -->
		<h:form id="edit_form" styleClass="form-horizontal">
		<h:panelGroup id="edit_group" styleClass="edit-group" style="display: none;" layout="block">
			<table id="edit_redirect-table" class="table table-striped" summary="Redirect configuration edit">
				<tbody>
					<tr style="display: none;"><td></td></tr>
					<tr id="redirect_cfg" class="form-site-redirect">
						<td colspan="4" style="padding-top: 10px;">
								<fieldset class="header-site-redirect">
									<legend class="hidden-element">
										<span>#{msg['redirect.admin.site.redirect.h.settings']}</span>
									</legend>
									<div class="onoffswitch">
										<h:selectBooleanCheckbox name="onoffswitch" styleClass="onoffswitch-checkbox" id="redirect3" value="#{rdrEdit.enabled}"/>
										<h:outputLabel for="redirect3" styleClass="onoffswitch-label">
											<span class="onoffswitch-inner">
												<span class="onoffswitch-active">#{msg['redirect.admin.site.redirect.on']}</span>
												<span class="onoffswitch-inactive">#{msg['redirect.admin.site.redirect.off']}</span>
											</span>
											<span class="onoffswitch-switch"></span>
										</h:outputLabel>
									</div>
									<h:panelGroup id="rdr-name-group" layout="block" styleClass="control-group rdr-name-group">
										<h:panelGroup id="rdr-name-prev" styleClass="rdr-name-prev #{name.valid ? '' : 'error-sibling'}"></h:panelGroup>
										<h:outputLabel for="name" styleClass="control-label">#{msg['redirect.admin.site.redirect.name']}</h:outputLabel>
										<h:inputText binding="#{name}" id="name" value="#{rdrEdit.name}" validator="rdrNameValidator" styleClass="input-medium rdr-edit-name" maxlength="40">
											<f:ajax event="keyup" eventsQueue="rdr" render="name-error edit_save rdr-name-prev" />
											<f:attribute name="vOriginalRedirectName" value="#{rdrEdit.getOriginalName()}" />
											<f:attribute name="vSiteName" value="#{rdrs.siteName}" />
										</h:inputText>
										<h:panelGroup id="name-error">
											<h:outputText id="name-error-text" styleClass="text-error rdr-name-error" value="#{name.valid ? '' : name.validatorMessage}" rendered="#{not name.valid}" />
										</h:panelGroup>
									</h:panelGroup>
									<div class="control-group">
										<h:panelGroup id="rdr-site-prev" styleClass="rdr-site-prev #{rdrs.sites.size() == 1 ? 'error-sibling' : ''}"></h:panelGroup>
										<h:outputLabel for="redirect" styleClass="control-label">#{msg['redirect.admin.site.redirect.to']}</h:outputLabel>
										<h:selectOneMenu id="redirect" value="#{rdrEdit.redirectSite}" style="height: 30px; line-height: 30px;">
											<f:selectItems value="#{rdrs.sites}" var="site" itemLabel="#{site.name}" itemValue="#{site.name}" itemDisabled="#{site.name eq rdrs.siteName}" />
											<f:ajax listener="#{rdrEdit.loadRedirectNodes}" />
										</h:selectOneMenu>
										<h:panelGroup id="redirect-error" layout="block">
											<h:outputText id="redirect-error-text" styleClass="text-error rdr-site-error" value="#{msg['redirect.admin.site.redirect.to.nosites']}" rendered="#{rdrs.sites.size() == 1}" />
										</h:panelGroup>
									</div><!-- End .control-group -->
								</fieldset>
								<fieldset>
									<legend>
										<span class="toggle">#{msg['redirect.admin.site.redirect.conditions']}</span>
									</legend>
										<h:panelGroup id="conditions-group" styleClass="control-group" layout="block">
											<div class="alert" style="#{empty rdrEdit.conditions ? '' : 'display: none;'}">#{msg['redirect.admin.site.redirect.conditions.msg']}</div>
											<b:commandButton styleClass="btn btn-small inside-table add-condition" value="#{msg['redirect.admin.site.redirect.conditions.add']}" action="#{rdrEdit.addCondition}" oncomplete="$('#conditionOp').text('#{msg['redirect.admin.condition.h.condition.add']}'); $('#modal-condition').modal('show'); $('input[id$=&quot;condition_name&quot;]').focus();" execute="@this" render=":condition_form" />
											<table class="table table-striped button-small" id="conditions-table" summary="Redirect conditions">
												<thead style="#{empty rdrEdit.conditions ? 'display: none;' : ''}">
													<tr>
														<th scope="col">#{msg['redirect.admin.site.redirect.conditions.name']}</th>
														<th scope="col">#{msg['redirect.admin.site.redirect.conditions.setting']}</th>
														<th scope="col" class="hidden-element actions">#{msg['redirect.admin.site.redirect.conditions.actions']}</th>
													</tr>
												</thead>
												<tbody class="sortable sortable-cnd">
													<ui:repeat value="#{rdrEdit.conditions}" var="rc" varStatus="rc_st">
													<tr>
														<td class="rdr-cond-name">#{rc.name}</td>
														<td class="rdr-cond-settings">
															<h:panelGroup rendered="#{rc.userAgentConditions.contains.size() > 0 or rc.userAgentConditions.doesNotContain.size() > 0}"><strong>#{msg['redirect.admin.site.redirect.conditions.agent']} </strong></h:panelGroup>
															<ui:repeat value="#{rc.userAgentConditions.contains}" var="rcUACcont" varStatus="cnt_st">
																<h:panelGroup rendered="#{cnt_st.first}">
																	<em>#{msg['redirect.admin.site.redirect.conditions.contains']} </em>
																</h:panelGroup>
																<h:panelGroup rendered="#{not cnt_st.first}"><span>#{msg['redirect.admin.condition.exp.or']}</span></h:panelGroup>
																'#{rcUACcont}'
															</ui:repeat>
															<ui:repeat value="#{rc.userAgentConditions.doesNotContain}" var="rcUACnotcont" varStatus="dnc_st">
																<h:panelGroup rendered="#{dnc_st.first}">
																	<em>#{msg['redirect.admin.condition.nocontains']} </em>
																</h:panelGroup>
																<h:panelGroup rendered="#{not dnc_st.first}"><span>#{msg['redirect.admin.condition.exp.or']}</span></h:panelGroup>
																'#{rcUACnotcont}'
															</ui:repeat>
															<br/>
															<ui:repeat value="#{rc.deviceProperties}" var="devProp" varStatus="dp_st">
																<h:panelGroup rendered="#{dp_st.first}">
																	<strong>#{msg['redirect.admin.condition.properties']} </strong>
																</h:panelGroup>
																<h:panelGroup rendered="#{not dp_st.first}"><span>#{msg['redirect.admin.condition.exp.and']}</span></h:panelGroup>
																'#{devProp.propertyName}'
																<h:panelGroup rendered="#{devProp.equals != null}">
																	#{msg['redirect.admin.condition.param.eq']} '#{devProp.equals}'
																</h:panelGroup>
																<h:panelGroup rendered="#{devProp.matches != null}">
																	#{msg['redirect.admin.condition.param.mt']} '#{devProp.matches}'
																</h:panelGroup>
																<h:panelGroup rendered="#{devProp.greaterThan != null and devProp.lessThan != null}">
																	#{msg['redirect.admin.condition.param.bw']} #{devProp.greaterThan} and #{devProp.lessThan}
																</h:panelGroup>
																<h:panelGroup rendered="#{devProp.greaterThan != null and devProp.lessThan == null}">
																	#{msg['redirect.admin.condition.param.gt']} #{devProp.greaterThan}
																</h:panelGroup>
																<h:panelGroup rendered="#{devProp.lessThan != null and devProp.greaterThan == null}">
																	#{msg['redirect.admin.condition.param.lt']} #{devProp.lessThan}
																</h:panelGroup>
															</ui:repeat>
														</td>
														<td class="actions">
															<a4j:commandLink styleClass="add-condition" render=":condition_form" execute="@this" oncomplete="$('#conditionOp').text('#{msg['redirect.admin.condition.edit']}'); $('#modal-condition').modal('show')" title="#{msg['redirect.admin.condition.edit']}"><a4j:param value="#{rc_st.index}" assignTo="#{rdrEdit.currentConditionIndex}" /><f:setPropertyActionListener target="#{rdrEdit.editedCondition}" value="#{rc}" /><i class="icon-pencil tooltipTrigger" data-original-title="#{msg['redirect.admin.condition.edit']}">#{msg['redirect.admin.condition.param.bw']}#{msg['redirect.admin.condition.edit']}</i></a4j:commandLink>
															<a4j:commandLink action="#{rdrEdit.removeCondition(rc_st.index)}" styleClass="tooltipTrigger" render="conditions-group" onclick="$(this).tooltip('hide');" title="#{msg['redirect.admin.condition.delete']}"><i class="icon-trash">#{msg['redirect.admin.condition.delete']}</i></a4j:commandLink>
														</td>
													</tr>
													</ui:repeat>
                          <tr style="display: none"><td></td></tr>
												</tbody>
											</table>
											<h:outputScript>sortable();</h:outputScript>
										</h:panelGroup><!-- End .control-group -->
								</fieldset>
								<fieldset id="node-mappings">
									<legend>
										<span class="toggle">#{msg['redirect.admin.condition.mapping']}</span>
									</legend>
									<div>
										<div class="control-group">
											<label for="matching" class="control-label">#{msg['redirect.admin.condition.mapping.match']}</label>
											<div class="controls">
												<label class="checkbox">
													<h:selectBooleanCheckbox name="matching" id="matching" value="#{rdrEdit.useNodeNameMatching}"/>#{msg['redirect.admin.condition.mapping.match.msg']}
												</label>
												<i class="icon-info-sign icon-gray tooltipTrigger data-placement-right" title="#{msg['redirect.admin.condition.mapping.match.origin']}">#{msg['redirect.admin.condition.mapping.match.origin']}</i>
											</div>
										</div><!-- End .control-group -->
										<h:panelGroup layout="block" id="mappingsWrapper" styleClass="control-group">
											<label class="control-label">#{msg['redirect.admin.condition.mapping.h']}</label>
											<div class="controls">
												<div class="alert" style="#{empty rdrEdit.mappings.mappings ? '' : 'display: none;'}">#{msg['redirect.admin.condition.mapping.missing']}</div>
												<a4j:commandButton id="addMappingButton" action="#{rdrEdit.addNodeMapping}" styleClass="btn btn-small inside-table pull-right" execute="@this" render="mappingsWrapper" oncomplete="$('.origin-node-name-input').first().focus().keyup(); $('.redirect-node-name-input').first().keyup();" disabled="#{not facesContext.postback or facesContext.validationFailed}" value="#{msg['redirect.admin.condition.mapping.add']}" />
												<table class="table table-striped action-button" id="mappings" summary="Redirect mappings">
													<thead style="#{empty rdrEdit.mappings.mappings ? 'display: none;' : ''}">
														<tr>
															<th scope="col">#{msg['redirect.admin.condition.mapping.origin']}</th>
															<th scope="col">#{msg['redirect.admin.condition.mapping.redirect']}</th>
															<th scope="col" class="hidden-element actions">#{msg['redirect.admin.condition.mapping.actions']}</th>
														</tr>
													</thead>
													<tbody id="mappings-tbody">
														<ui:repeat value="#{rdrEdit.mappings.mappings}" var="m" varStatus="counter">
														<tr class="node-mapping-viewer #{empty m.originNode or empty m.redirectNode ? 'hidden-element' : ''}">
															<td>#{m.originNode}</td>
															<td>#{m.redirectNode}</td>
															<td class="actions">
																<a href="#" class="edit-node-mapping tooltipTrigger" data-original-title="#{msg['redirect.admin.condition.mapping.edit']}" onclick="editMappingEntry(this); return false;"><i class="icon-pencil">#{msg['redirect.admin.condition.mapping.edit']}</i></a>
																<a4j:commandLink action="#{rdrEdit.removeNodeMapping(counter.index)}" styleClass="tooltipTrigger" title="#{msg['redirect.admin.condition.mapping.delete']}" render="mappingsWrapper" onclick="$(this).tooltip('hide');"><i class="icon-trash">#{msg['redirect.admin.condition.mapping.delete']}</i></a4j:commandLink>
															</td>
														</tr>
														<!-- Just so that we keep the odd/even colors -->
														<tr class="node-mapping-spacer" style="display: none;"><td></td></tr>
														<tr class="node-mapping-editor #{empty m.originNode or empty m.redirectNode ? '' : 'hidden-element'}">
															<td>
																<h:panelGroup id="origin_nm_group" layout="block" styleClass="input-append">
																	<h:panelGroup id="origin_nm_prev" styleClass="#{origin_nm.valid ? '' : 'error-sibling'}"></h:panelGroup>
																	<h:inputText binding="#{origin_nm}" id="origin_nm" value="#{m.originNode}" validator="rdrNodeMappingValidator" styleClass="input-medium origin-node-name-input">
																		<f:ajax event="keyup" eventsQueue="rdr" render="origin_nm_error redirect_nm_error origin_nm_prev :edit_form:addMappingButton :edit_form:edit_save" />
																	</h:inputText>
																	<b:commandButton
																			styleClass="tooltipTrigger select-node"
																			title="#{msg['redirect.admin.condition.mapping.view']}"
																			style="width: 40px; margin-left: -5px; height: 30px;"
																			render="modal-select-node-wrapper"
																			onclick="nodeInput = $(this).prev('input')"
																			oncomplete="showNodeList()"
																			execute="@this"
																			action="#{rdrEdit.setCurrentNodeNames(true)}"><i class="icon-list" ></i></b:commandButton>
																</h:panelGroup>
																<h:panelGroup id="origin_nm_error">
																	<h:outputText style="color: #AA0000; font-size: 11px;" styleClass="text-error rdr-origin-nm-error" value="#{origin_nm.valid ? '&#160;' : origin_nm.validatorMessage}" rendered="#{not origin_nm.valid or not redirect_nm.valid}" />
																</h:panelGroup>
															</td>
															<td>
																<h:panelGroup id="redirect_nm_group" layout="block" styleClass="input-append">
																	<h:panelGroup id="redirect_nm_prev" styleClass="#{redirect_nm.valid ? '' : 'error-sibling'}"></h:panelGroup>
																	<h:inputText binding="#{redirect_nm}" id="redirect_nm" value="#{m.redirectNode}" validator="rdrNodeMappingValidator" styleClass="input-medium redirect-node-name-input">
																		<f:ajax event="keyup" eventsQueue="rdr" render="redirect_nm_error origin_nm_error redirect_nm_prev :edit_form:addMappingButton :edit_form:edit_save" />
																	</h:inputText>
																	<b:commandButton
																			styleClass="tooltipTrigger select-node"
																			title="#{msg['redirect.admin.condition.mapping.view']}"
																			style="width: 40px; margin-left: -5px; height: 30px;"
																			render="modal-select-node-wrapper"
																			onclick="nodeInput = $(this).prev('input')"
																			oncomplete="showNodeList()"
																			execute="@this redirect"
																			action="#{rdrEdit.setCurrentNodeNames(false)}"><i class="icon-list" ></i></b:commandButton>
																</h:panelGroup>
																<h:panelGroup id="redirect_nm_error">
																	<h:outputText style="color: #AA0000; font-size: 11px;" styleClass="text-error rdr-redirect-nm-error" value="#{redirect_nm.valid ? '&#160;' : redirect_nm.validatorMessage}" rendered="#{not origin_nm.valid or not redirect_nm.valid}" />
																</h:panelGroup>
															</td>
															<td class="actions">
																<a4j:commandLink action="#{rdrEdit.removeNodeMapping(counter.index)}" execute="@this" styleClass="tooltipTrigger" title="#{msg['redirect.admin.condition.mapping.delete']}" render="mappingsWrapper :edit_form:edit_save" onclick="$(this).tooltip('hide');"><i class="icon-trash">#{msg['redirect.admin.condition.mapping.delete']}</i></a4j:commandLink>
															</td>
														</tr>
														</ui:repeat>
                            <tr style="display: none"><td></td></tr>
													</tbody>
												</table>
											</div>
										</h:panelGroup><!-- End .control-group -->
										<div class="control-group">
											<label class="control-label" for="nodes">#{msg['redirect.admin.condition.mapping.unresolved']}</label>
											<div class="controls">
												<h:selectOneMenu id="nodes" style="height: 30px; line-height: 30px;" value="#{rdrEdit.mappings.unresolvedNode}">
													<f:selectItem itemValue="REDIRECT" itemLabel="#{msg['redirect.admin.condition.mapping.item.redirect']}" />
													<f:selectItem itemValue="NO_REDIRECT" itemLabel="#{msg['redirect.admin.condition.mapping.item.noredirect']}" />
													<f:selectItem itemValue="ROOT" itemLabel="#{msg['redirect.admin.condition.mapping.item.root']}" />
													<f:selectItem itemValue="COMMON_ANCESTOR_NAME_MATCH" itemLabel="#{msg['redirect.admin.condition.mapping.item.ancestor']}" />
												</h:selectOneMenu>
												<i class="icon-info-sign icon-gray tooltipTrigger data-placement-right" title="#{msg['redirect.admin.condition.mapping.unresolved.msg']}">#{msg['redirect.admin.condition.mapping.unresolved.msg']}</i>
											</div>
										</div><!-- End .control-group -->
									</div>
								</fieldset>
								<div class="form-actions">
									<button id="edit_cancel" class="btn" onclick="closeRedirectEdit(false); return false;" >#{msg['redirect.admin.condition.mapping.cancel']}</button>
									<a4j:commandButton id="edit_save" value="#{msg['redirect.admin.condition.mapping.save']}" styleClass="btn btn-primary" action="#{rdrEdit.saveRedirect}" render="pgRedirectSummary :edit_form :sum_form" eventsQueue="rdr" oncomplete="closeRedirectEdit(true)" disabled="#{(rdrs.sites.size() == 1) or not name.valid or not facesContext.postback or facesContext.validationFailed}" />
								</div><!-- End .form-actions -->
						</td>
					</tr>
				</tbody>
			</table>
		</h:panelGroup>
		</h:form><!-- End .form-horizontal -->

		<h:form id="sortForm" style="display: none;">
			<h:inputHidden id="sortFrom" value="#{rdrEdit.sortFrom}" />
			<h:inputHidden id="sortTo" value="#{rdrEdit.sortTo}" />
			<h:inputHidden id="sortSite" value="#{rdrEdit.sortSite}" />
			<a4j:commandLink action="#{rdrEdit.doSortCondition}" id="doSortCndBtn" value="" render="@form conditions-group" execute="@form" />
			<a4j:commandLink action="#{rdrEdit.doSortRedirect}"  id="doSortRdrBtn" value="" render="@form sum_form" execute="@form" />
		</h:form>

		<ui:include src="/admin/redirects/modals/modal-condition.xhtml" />
		<ui:include src="/admin/redirects/modals/modal-select_node.xhtml" />
		<ui:include src="/admin/redirects/modals/modal-delete_site.xhtml" />
		<ui:include src="/admin/redirects/modals/modal-delete_redirect.xhtml" />
		<ui:include src="/admin/redirects/modals/modal-import_site.xhtml" />

		<h:outputScript>
			$(document).ready(function(){
				var nodeInput = null;
			});
		</h:outputScript>

	</ui:define>
</ui:composition>
